from django.shortcuts import render
from personModel.models import person
# Create your views here.
def add(request):
    print('跳转到persion添加页面')
    return render(request,'person/add.html')
def update(request):
    context = {}
    print('跳转到修改页面')
    id = request.GET['id']
    p = person.objects.get(id = id)
    print(p)
    context['id'] = p.id
    context['name'] = p.name
    context['gender'] = p.gender
    context['age'] = p.age
    return render(request, 'person/update.html',context)
def list(request):
    print('跳转到list列表页面')
    return render(request, 'person/list.html')